import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
    },
  },
  server: {
    proxy: {
      // 选项写法
      '/apis': {
        target: "https://www.dance365.com",
        changeOrigin: true
        // rewrite: (path) => path.replace(/^\/apis/, '')
      },
      "/api": {
        target: "http://gmall-h5-api.atguigu.cn",
        changeOrigin: true,
        // pathRewrite: { "^/api": "" }

      },
    }
  }
})
